package com.smart.community.common.oss.config;

import lombok.Data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;

import javax.annotation.PostConstruct;

/**
 * @author 子未语
 */
@Data
@ConfigurationProperties("oss.ali")
public class OssConfigProperties {
    private String endpoint;
    private String accessKeyId;
    private String secretAccessKey;
    private String bucketName;
    private String doMain;

    private static final Logger log = LoggerFactory.getLogger(OssConfigProperties.class);

    @PostConstruct
    public void logProperties() {
        log.info("endpoint:{},accessKeyId{},secretAccessKey{},bucketName{},doMain{}", endpoint, accessKeyId, secretAccessKey, bucketName, doMain);
    }
}
